
<?php

function echoRadio($columns, $inputName) {

    $checked = "";
    $notChecked = "";
    if ($columns[$inputName])
        $checked = "checked='true'";
    else
        $notChecked = "checked='true'";

    echo "<input type='radio' value='true' $checked name='$inputName'/>oui";
	echo "<input type='radio' value='false' $notChecked name='$inputName'/>non";
}

?>

<div id='profile-box'>

    <?php
        if ($this->user['profile'] == 0) {
            echo '<a id="zendCache" class="button" href="';
            echo $this->url(array('controller' => 'index', 'action' => 'emptycache'));
            echo '">';
            echo $this->translate('empty_cache');
            echo '</a>';
        }
    ?>

	<h2 class='profile'>Infos</h2>
	<div>
	    <h3 class='profile'>E-mail</h3>
	    <div><?php echo $this->user['email'] ?></div>
	    <h3 class='profile'>Date d'inscription</h3>
	    <div><?php echo $this->user['inscription'] ?></div>
	    <h3 class='profile'>Pseudo</h3>
	    <div><label id='label-current-pn'><?php echo $this->user['login'] ?></label></div>
	    <div>
	        Changer:
	        <input id='text-new-pn' type='text'/>
    	    <input id='button-save-new-pn' type='button' value='Sauvegarder'/>
    	    <!-- Rempli via js -->
	        <label id='label-current-pn-msg-update'></label>
	    </div>
	</div>

	<h2 class='profile'>Changer son Mot de passe</h2>
	<div>
		<form id='form-change-pass'>
			<div>Ancien<input id='old-pass' type='password'/></div>
			<div>Nouveau<input id='new-pass-1' type='password'/></div>
			<div>Re-taper<input id='new-pass-2' type='password'/></div>
			<div>
			    <input id='button-save-new-pass' type='button' value='Sauvegarder'/>
		    </div>
    	    <!-- Rempli via js -->
	        <label id='label-pass-update'></label>
	    </form>
	</div>

	<?php $columns = $this->params['columns']; ?>
	<h2 class='profile'>Parametres</h2>
	<h3 class='profile'>Tableaux : Afficher les colonnes</h3>
	<div style='width:300px'>
    	<div class='right'>Nom francais <?php echoRadio($columns, 'nameFr'); ?></div>
        <div class='right'>Ma note <?php echoRadio($columns, 'myRating'); ?></div>
        <div class='right'>Note moyenne <?php echoRadio($columns, 'avgRating'); ?></div>
        <div class='right'>Format <?php echoRadio($columns, 'format'); ?></div>
        <div class='right'>Qualité <?php echoRadio($columns, 'quality'); ?></div>
        <div class='right'>Langues <?php echoRadio($columns, 'languages'); ?></div>
        <div class='right'>Sous-titres <?php echoRadio($columns, 'subtitles'); ?></div>
        <div class='right'>Regardé <?php echoRadio($columns, 'watched'); ?></div>
    </div>
	<div><input id='save-params-columns-button' type='button' value='Sauvegarder'/></div>

    <h3 class='profile'>Ajout rapide de film : valeurs par défaut</h3>
	<div style='width:300px'>
	    <div class='right'>Format
	        <select>
	            <option>Aucun</option>
	            <option>Blueray</option>
	            <option>DVD</option>
	            <option>Virtuel</option>
            </select>
        </div>
<!-- 	    <div>Qualité <input type='text'/></div> -->
	    <div class='right'>Langues
	        <input type='checkbox' value='1' name='lang'/>en
	        <input type='checkbox' value='2' name='lang'/>fr
	        <input type='checkbox' value='3' name='lang'/>Autre
	    </div>
	    <div class='right'>Sous-titres
	        <input type='checkbox' value='1' name='ss'/>en
	        <input type='checkbox' value='2' name='ss'/>fr
	        <input type='checkbox' value='3' name='ss'/>Autre
	    </div>
	    <div class='right'>Regardé
    	    <input type='radio' value='true' checked='true' name='watched'/>...
	        <input type='radio' value='true' name='watched'/>oui
	        <input type='radio' value='false' name='watched'/>non
	    </div>
    </div>
	<div><input id='save-params-add-movie-button' type='button' value='Sauvegarder'/></div>

	<br/><br/>
</div>



